package com.ly.mpayment.persist.service.downshopproduct;

import java.math.BigDecimal;
import java.math.BigInteger;
import java.util.List;
import java.util.Map;

import com.ly.mpayment.persist.entity.DownShopProduct;
import com.ly.mpayment.persist.entity.ProductPrice;
import com.ly.mpayment.persist.entity.ProductPriceUp;
import com.ly.mpayment.persist.entity.User;
import com.ly.mpayment.persist.hibernate.Page;


public interface IDownShopProductService {

	public boolean addDownshopproduct(DownShopProduct product,User userAdmin);

	public boolean updateDownshopproduct(DownShopProduct product,User userAdmin,boolean enable);

	public boolean updateDownshopProductAuto(DownShopProduct product,User userAdmin);

	public boolean updateDownshopProduct(User user,DownShopProduct product);


	public DownShopProduct findById(String id);

	/**
	 * 添加策略时 只查询可用的产品
	 * @param id
	 * @return
	 */
	public DownShopProduct findProductStrategy(String id);

	public DownShopProduct findByNotUseUUId(String id,String userId);

	public Page<DownShopProduct> findPageDownshopproduct(Map<String, Object> parameters ,int start,int pageSize);

	/**
	 * 下游订单检查
	 * @param busCode
	 * @param faceValue
	 * @return
	 */
	public List findProductBus(String operators,String province,String busCode,String shopUuid,BigDecimal faceValue);

	public DownShopProduct findByIdAndProductCode(String useruuid, String productCode);

	public DownShopProduct findByIdAndFacevalue(String useruuid, String faceValue);
//	public List<DownShopProduct> findProduct(String busCode,BigDecimal faceValue);

	public List<DownShopProduct> getProductList(String useruuid);

	public List<DownShopProduct> exportDownCount(Map<String, Object> parameters);

	public DownShopProduct searchBatchProduct(String operators,String province,String busuuid,String shopUuid,String faceValue,BigDecimal price,String productCode);

	public List<DownShopProduct>  findBatchEditUpProduct(String provinceuuid, String operatoruid, String busuuid, String useruuid,String cityName,String discount,String downfacevalue);

	public List<DownShopProduct>  findByUuidDownProduct(String useruuid,String provinceuuid, String operatoruid,String busuuid);

	public List<DownShopProduct> findByUuidDown(String useruuid);

	/**
	 * 按省份地市查询
	 * @param uid
	 * @param province
	 * @param city
	 * @param money
	 * @return
	 */
	List<DownShopProduct> findByUuidAndCity(String uid, String province, String city, String money, String busCode,String operatoruid);

	/**
	 * 查询全国s
	 * @param uid
	 * @param money
	 * @param busCode
	 * @return
	 */
	List<DownShopProduct> findByGlobalCountry(String uid,String money,String busCode,String operatoruid);


	/**
	 * 按省份查询
	 * @param uid
	 * @param money
	 * @param province
	 * @param busCode
	 * @return
	 */
	List<DownShopProduct> findByUuidAndProvice(String uid, String money, String province, String busCode,String operatoruid);

	void updateProduct(DownShopProduct downShopProduct);

    DownShopProduct findByYiSai(String productid, String partnerid);

    String handleBatchStatus(String data,String token);

	BigInteger findProductStrategyCount(String upprouuids);

	void updateProductPrice(ProductPrice price);

	String deleteDownProduct(String data);

}
